package com.ruyuan.scholartrade.controller;

import cn.hutool.db.Page;
import com.scholar.shop.common.CommonRes;
import com.scholar.shop.trad.depositeLog.api.DepositeLogAPI;
import com.scholar.shop.trad.depositeLog.domain.AddDepositeLogRequest;
import com.scholar.shop.trad.recharge.domain.DepositeParamDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @description: 预存款记录客户端实现
 * @author: liuyulei
 * @create: 2020-01-02 16:32
 * @version:1.0
 * @since:7.1.4
 **/
@CrossOrigin
@RestController
@RequestMapping("/trade/depositeLog/open/api")
public class DepositeLogAPIController {


    @Autowired
    private DepositeLogAPI depositeLogManager;

    
    @PostMapping("/add")
    public CommonRes<Boolean> add(@RequestBody AddDepositeLogRequest log) {

        return depositeLogManager.add(log);
    }

    
    @PostMapping("/list")
    public CommonRes<Page> list(@RequestBody  DepositeParamDTO paramDTO) {
        return this.depositeLogManager.list(paramDTO) ;
    }
}
